package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.domain.Strategy;
import cn.wolfcode.trip.base.domain.StrategyCatalog;
import cn.wolfcode.trip.base.domain.StrategyDetail;
import cn.wolfcode.trip.base.query.StrategyQueryObject;
import cn.wolfcode.trip.base.service.IStrategyCatalogService;
import cn.wolfcode.trip.base.service.IStrategyDetailService;
import cn.wolfcode.trip.base.service.IStrategyService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 大攻略资源管理
 */

@RestController
@RequestMapping("strategyDetails")
public class StrategyDetailsController {

    //关联service
    @Autowired
    private IStrategyDetailService strategyDetailService;

    //根据detail的id获取对应文章信息,在mapper里面处理一下,交两个表,顺便把文章内容也选出来
    @GetMapping("{id}")
    public StrategyDetail getById(@PathVariable Long id){
        return  strategyDetailService.getById(id);
    }

}
